new Vue({
	el: '#active',
	data: {
		list:[]
	},
	filters:{
		joinTypeFilter:filter.joinTypeFilter,
		filterCount:filter.filterCount
	},
	computed:{
		ifEnd:function(){
			var date = new Date().getTime();
			var endTime = new Date(this.list.endTime).getTime();
			if(endTime<date){
				return '报名已截止'
			}else{
				return '报名中'
			}
		}
	},
	methods: {
		plusReady: function() {
			this.getMeeting();
		},
		bm: function(e) {
			if(this.list.joinType=="0"){
				mui("#popover").popover('toggle', document.getElementById("div"));
			}
		},
		person: function() {
			var context =this;
			commonOpenWindow("mine/sign-up-organize.html", "sign-up-organize.html",  context.list.id, "0")

		},
		jg: function() {
			var context =this;
			commonOpenWindow("mine/sign-up-personal.html", "sign-up-personal.html", context.list.id, "0")
		},
		getMeeting: function() {
			var context = this;
			var  lan="ZH"
			if(localStorage.getItem("localLang")==0){
				lan="ZH";
			}else{
				lan="EN";
			}
			var ajax={
				"language":lan
			}
			
			ajAjax("app/meeting/getMeeting.do", ajax, function(data) {
				context.list=data.Rows[0];
			}, function(err) {
				mui.toast('获取活动列表失败')
			});
			//邀请函
			var ajaxData={
				"language":lan,
				"meetingId":''
			}
			ajAjax("app/invatation/getInvitation.do", ajaxData, function(data) {
				context.list=data.Rows[0];
			}, function(err) {
				mui.toast('获取活动列表失败')
			});
		},
		goActiveList: function() {
			commonOpenWindow("active/active.html", "active.html", null, "0")
		},
		gotoDatail:function(item){
			commonOpenWindow("active/active-detail.html", "active-detail.html", item, "0")
		}
	},
	mounted: function() {
			this.getMeeting();
		
		if(window.plus) {
			this.plusReady();
		} else {
			document.addEventListener("plusready", this.plusReady, false);
		}
	}
});